package dao.interfaces;

import engine.Instance;
import java.util.ArrayList;

/**
 * A data access object interface for instances.
 * @author Johnny
 */
public interface InstanceDao {

    /**
     * Returns the list of instances of a unit.
     * @param unitId the id of the unit who's instances will be fetched.
     * @return the list of instances.
     */
    public ArrayList<Instance> getInstances(int unitId);
    /**
     * Adds a new instance to the unit.
     * @return the newly created instance.
     */
    public Instance addInstance(int unitId);

    /**
     * Removes an instance from the unit.
     * @param instanceId the id of the instance that will be deleted.
     */
    public void removeInstance(int instanceId);

    /**
     * Sets the schedule for an instance.
     * @param inst the instance who's schedule was modified.
     */
    public void setSchedule(Instance inst);
}
